package org.benjamin.lending.controller;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xywen on 2017/6/6.
 */
@RestController
@RequestMapping("restService")
public class RestServiceController {

    private Logger logger = LogManager.getLogger();

    @PostMapping("login")
    public boolean login(String username,String password){
        logger.info("username={} password={}",username,password);
        return true;
    }

    @PostMapping("clientList")
    public List<String> clientList(){
        List<String> clientList = new ArrayList<String>();
        clientList.add("你好");
        clientList.add("我靠");
        return clientList;
    }
}
